package cn.vire.electric.simulation.event;

import cn.vire.electric.simulation.config.filter.CommonFilter;
import org.slf4j.MDC;
import org.springframework.context.ApplicationEvent;

import java.io.Serializable;

public abstract class BaseEvent extends ApplicationEvent implements Serializable {

    private static final long serialVersionUID = 7033812587185558010L;

    private String requestId;

    public BaseEvent(Object source) {
        super(source);
        this.requestId = MDC.get(CommonFilter.REQUESTID);
    }

    public String getRequestId() {
        return requestId;
    }

}
